package com.busfm.media;

import com.busfm.model.SongEntity;

public interface PlayControllerListener {
	/**
	 * Callback invoked before starting a new track, return false to prevent
	 * playback from happening
	 * 
	 * @param playlistEntry
	 */
	public boolean onTrackStart();

	/**
	 * Callback invoked when a new track is played
	 * 
	 * @param SongEntity
	 */
	public void onTrackChanged(SongEntity songEntity);

	/**
	 * Callback invoked periodically, contains info on track playing progress
	 * 
	 * @param seconds
	 *            int value
	 */
	public void onTrackProgress(int seconds);

	/**
	 * Callback invoked when buffering a track
	 * 
	 * @param percent
	 */
	public void onTrackBuffering(int percent);

	/**
	 * Callback invoked when track is stoped
	 */
	public void onTrackStop();

	/**
	 * Callback invoked when track is paused
	 */
	public void onTrackPause();

	/**
	 * Callback invoked when there was an error with streaming
	 */
	public void onTrackStreamError();
	
	/**maybe request again
	 * 
	 */
	public void onUpdatePlayList();
}
